USE [SpringSocial]
GO

/****** Object:  Table [dbo].[Level]    Script Date: 03/22/2012 18:17:51 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Level](
	[id] [int] NOT NULL,
	[value] [int] NULL,
	[countryCode] [varchar](3) NOT NULL,
	[name] [varchar](50) NULL,
 CONSTRAINT [PK_Level] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Level]  WITH CHECK ADD  CONSTRAINT [FK_Level_Country] FOREIGN KEY([countryCode])
REFERENCES [dbo].[Country] ([code])
GO

ALTER TABLE [dbo].[Level] CHECK CONSTRAINT [FK_Level_Country]
GO


